home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / Dave Mark / Learn C on the Mac / libs & .h files / stdlib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-05-21  |  1.4 KB  |  74 lines  |  [TEXT/KAHL]

  1.  
  2. /*
  3.  *  stdlib.h
  4.  *
  5.  *  Copyright (c) 1989 Symantec Corporation.  All rights reserved.
  6.  *
  7.  */
  8.  
  9. #define _H_stdlib
  10.  
  11. #ifndef NULL
  12. #define NULL        ((void *) 0)
  13. #endif
  14.  
  15. #define EXIT_SUCCESS            0
  16. #define EXIT_FAILURE            (-1)
  17. #define RAND_MAX                32767
  18. #define MB_CUR_MAX                1
  19.  
  20. typedef struct { int quot, rem; } div_t;
  21. typedef struct { long quot, rem; } ldiv_t;
  22.  
  23. #ifndef __size_t
  24. #define __size_t
  25. typedef unsigned long size_t;
  26. #endif
  27.  
  28. #ifndef __wchar_t
  29. #define __wchar_t
  30. typedef char wchar_t;
  31. #endif
  32.  
  33. double atof(char *);
  34. int atoi(char *);
  35. long atol(char *);
  36. double strtod(char *, char **);
  37. long strtol(char *, char **, int);
  38. unsigned long strtoul(char *, char **, int);
  39.  
  40. int rand(void);
  41. void srand(unsigned);
  42.  
  43. void *calloc(size_t, size_t);
  44. void free(void *);
  45. void *malloc(size_t);
  46. void *realloc(void *, size_t);
  47.  
  48. void abort(void);
  49. int atexit(void (*)());
  50. void exit(int);
  51. char *getenv(char *);
  52. int system(char *);
  53.  
  54. void *bsearch(void *, void *, size_t, size_t, int (*)());
  55. void qsort(void *, size_t, size_t, int (*)());
  56.  
  57. int abs(int);
  58. div_t div(int, int);
  59. long labs(long);
  60. ldiv_t ldiv(long, long);
  61.  
  62. int mblen(char *, size_t);
  63. int mbtowc(wchar_t *, char *, size_t);
  64. int wctomb(char *, wchar_t);
  65.  
  66. size_t mbstowcs(wchar_t *, char *, size_t);
  67. size_t wcstombs(char *, wchar_t *, size_t);
  68.  
  69. void _exit(int);
  70. int _atexit(void (*)());
  71. void _exiting(int);
  72. extern int _abnormal_exit;
  73. void _qsort(size_t, int (*)(), void (*)());
  74.